package cp.remote.controller;

import cp.remote.activity.Main_Activity;
import cp.remote.config.NetworkConfig;
import cp.remote.network.TaskSwitch;
import cp.remote.timer.CampusBotNetworkTimer;
import android.view.View;
import android.view.View.OnClickListener;

public class StopTask implements OnClickListener {

    private Main_Activity act;
    
    public StopTask(Main_Activity act){
        this.act = act;
    }
    
	public void onClick(View v) {
	    act.setStateText("Sending Stop Signal");
		NetworkConfig.nettask.send(TaskSwitch.STOP);
		CampusBotNetworkTimer.startHandler(act, NetworkConfig.nettask);
	}

}
